Description:
The negation operator slows down the readability of the program, so it is recommended that it should not be used frequently.
Incorrect:
if (!readNext()) {
reportError();
} else {
processNext();
}
Correct:
if (readNext()) {
processNext();
} else {
reportError();
}
Refactoring: